﻿using GameProtocol.DTO.Fight;
using System;
using System.Collections.Generic;
using System.Text;

namespace GameProtocol.DTO.Const
{
    public class HeroData
    {
        public static readonly Dictionary<int, HeroDataModel> heroDic = new Dictionary<int, HeroDataModel>();


        static HeroData() { 
            //从外部导入英雄数据，初始化后放入英雄字典中
            CreateDataModel(1, "大屌萌妹", 500, 20, 20, 2, 10, 2, 50, AttMode.Close);
        }

        static void CreateDataModel( int code,string name,int hpBase,int hpGrow,int attBase,int attGrow,float att_range,float att_speed,float mov_speed,AttMode attmode ) {
            HeroDataModel model = new HeroDataModel();
            model.code = code;
            model.name = name;
            model.hpBase = hpBase;
            model.hpGrow = hpGrow;
            model.attBase = attBase;
            model.attGrow = attGrow;
            model.att_range = att_range;
            model.att_speed = att_speed;
            model.mov_speed = mov_speed;
            model.attmode = attmode;

            heroDic.Add(model.code, model);
        }
    }


    public class HeroDataModel{
        public int code; //英雄编码
        public string name;
        public int hpBase; //基础生命值
        public int hpGrow;//生命值成长
        public int attBase;//基础攻击力
        public int attGrow;//攻击成长
        public float att_range;//攻击距离
        public float att_speed;//攻击速度
        public float mov_speed;//移动速度
        public AttMode attmode;//攻击模式
        //public int[] skills;//拥有技能编号

        public HeroDataModel() { }

        public HeroDataModel(int code, string name, int hpBase, int hpGrow, int attBase, int attGrow, float att_range, float att_speed, float mov_speed, AttMode attmode) {
            this.code = code;
            this.name = name;
            this.hpBase = hpBase;
            this.hpGrow = hpGrow;
            this.attBase = attBase;
            this.attGrow = attGrow;
            this.att_range = att_range;
            this.att_speed = att_speed;
            this.mov_speed = mov_speed;
            this.attmode = attmode;
        }
    }
}
